﻿#region

using System;
using System.Linq;
using System.Web.Security;
using System.Web.UI;
using BusinessLogicLayer;

#endregion

namespace FastTrackCabService.AdminPanel
{
    public partial class Subsidiaries : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Roles.GetRolesForUser(User.Identity.Name).Contains("Manager")) Response.Redirect("Default.aspx");

            if (IsPostBack) return;
            Repeater1.DataSource = SubsidiaryBLL.GetAllSubsidiaries().OrderBy(sub => sub.CityId).ToList();
            Repeater1.DataBind();
        }
    }
}